% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shapes_from_fips.R
\name{shapes_counties_from_countyfips}
\alias{shapes_counties_from_countyfips}
\title{Get Counties boundaries via API, to map them}
\usage{
shapes_counties_from_countyfips(
  countyfips = "10001",
  outFields = c("NAME", "FIPS", "STATE_ABBR", "STATE_NAME", "POP_SQMI"),
  myservice =
    c("https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Boundaries_2022/FeatureServer/2/query",
    "https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Counties_and_States_with_PR/FeatureServer/0/query",
    "https://services.arcgis.com/cJ9YHowT8TU7DUyn/ArcGIS/rest/services/EJScreen_2_22_US_Percentiles_Tracts/FeatureServer/query")[1]
)
}
\arguments{
\item{countyfips}{FIPS codes as 5-character strings (or numbers) in a vector
as from fips_counties_from_state_abbrev("DE")}

\item{outFields}{can be "*" for all, or can be
just some variables like SQMI, POPULATION_2020, etc., or none}

\item{myservice}{URL of feature service to get shapes from.
Only default was tested}
}
\value{
spatial object via \code{\link[sf:st_read]{sf::st_read()}}
}
\description{
Get Counties boundaries via API, to map them
}
\details{
Used \code{\link[sf:st_read]{sf::read_sf()}}, which is an alias for \code{\link[sf:st_read]{sf::st_read()}}
but with some modified default arguments.
read_sf is quiet by default/ does not print info about data source, and
read_sf returns an sf-tibble rather than an sf-data.frame

Also note the tidycensus and tigris R packages.
}
\seealso{
\code{\link[=shapes_from_fips]{shapes_from_fips()}}
}
\keyword{internal}
